<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
	<%@ include file="../../include/head.jsp"%>
	<%@ include file="../../include/layui.jsp"%>
	<title>编辑用户</title>
</head>
<body>
<div class="layui-fluid">
	<div class="layui-card">
		<div class="layui-card-body">
			<form class="layui-form" action="">
				
				<input type="hidden" id="userId" name="userId" value="${user.userId}">
				<div class="layui-form-item">
					<label class="layui-form-label">会员ID即登录帐号</label>
					<div class="layui-input-block">
						<input type="text" id="userIdTmp" name="userIdTmp" lay-verify="userIdTmp" value="${user.userIdTmp}" autocomplete="off" placeholder="请输入会员ID即登录帐号" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">登录密码</label>
					<div class="layui-input-block">
						<input type="text" id="userPwd" name="userPwd" lay-verify="userPwd" value="${user.userPwd}" autocomplete="off" placeholder="请输入登录密码" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">会员名称</label>
					<div class="layui-input-block">
						<input type="text" id="userName" name="userName" lay-verify="userName" value="${user.userName}" autocomplete="off" placeholder="请输入会员名称" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">会员头像</label>
					<div class="layui-input-block">
						<input type="text" id="userImageUrl" name="userImageUrl" lay-verify="userImageUrl" value="${user.userImageUrl}" autocomplete="off" placeholder="请输入会员头像" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">会员性别 数据字典</label>
					<div class="layui-input-block">
						<input type="text" id="userGender" name="userGender" lay-verify="userGender" value="${user.userGender}" autocomplete="off" placeholder="请输入会员性别 数据字典" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">会员电话</label>
					<div class="layui-input-block">
						<input type="text" id="userMobilePhone" name="userMobilePhone" lay-verify="userMobilePhone" value="${user.userMobilePhone}" autocomplete="off" placeholder="请输入会员电话" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">会员电话所属运营商</label>
					<div class="layui-input-block">
						<input type="text" id="mobileCarriers" name="mobileCarriers" lay-verify="mobileCarriers" value="${user.mobileCarriers}" autocomplete="off" placeholder="请输入会员电话所属运营商" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">会员邮箱</label>
					<div class="layui-input-block">
						<input type="text" id="userEmail" name="userEmail" lay-verify="userEmail" value="${user.userEmail}" autocomplete="off" placeholder="请输入会员邮箱" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">会员等级 数据字典</label>
					<div class="layui-input-block">
						<input type="text" id="userLevel" name="userLevel" lay-verify="userLevel" value="${user.userLevel}" autocomplete="off" placeholder="请输入会员等级 数据字典" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">会员状态</label>
					<div class="layui-input-block">
						<input type="text" id="userStatus" name="userStatus" lay-verify="userStatus" value="${user.userStatus}" autocomplete="off" placeholder="请输入会员状态" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">绑定设备最大数</label>
					<div class="layui-input-block">
						<input type="text" id="bindPadMax" name="bindPadMax" lay-verify="bindPadMax" value="${user.bindPadMax}" autocomplete="off" placeholder="请输入绑定设备最大数" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">重置密码验证码</label>
					<div class="layui-input-block">
						<input type="text" id="resetValidataCode" name="resetValidataCode" lay-verify="resetValidataCode" value="${user.resetValidataCode}" autocomplete="off" placeholder="请输入重置密码验证码" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">重置密码验证码有效期</label>
					<div class="layui-input-block">
						<input type="text" id="resetValidataTime" name="resetValidataTime" lay-verify="resetValidataTime" value="${user.resetValidataTime}" autocomplete="off" placeholder="请输入重置密码验证码有效期" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">注册IP</label>
					<div class="layui-input-block">
						<input type="text" id="registerIp" name="registerIp" lay-verify="registerIp" value="${user.registerIp}" autocomplete="off" placeholder="请输入注册IP" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">登录方式 网页、客户端（android 、IOS、PC）</label>
					<div class="layui-input-block">
						<input type="text" id="loginType" name="loginType" lay-verify="loginType" value="${user.loginType}" autocomplete="off" placeholder="请输入登录方式 网页、客户端（android 、IOS、PC）" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">登录IP</label>
					<div class="layui-input-block">
						<input type="text" id="loginIp" name="loginIp" lay-verify="loginIp" value="${user.loginIp}" autocomplete="off" placeholder="请输入登录IP" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">登录时间</label>
					<div class="layui-input-block">
						<input type="text" id="loginTime" name="loginTime" lay-verify="loginTime" value="${user.loginTime}" autocomplete="off" placeholder="请输入登录时间" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">登录次数</label>
					<div class="layui-input-block">
						<input type="text" id="loginCount" name="loginCount" lay-verify="loginCount" value="${user.loginCount}" autocomplete="off" placeholder="请输入登录次数" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">创建人</label>
					<div class="layui-input-block">
						<input type="text" id="creater" name="creater" lay-verify="creater" value="${user.creater}" autocomplete="off" placeholder="请输入创建人" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">修改人</label>
					<div class="layui-input-block">
						<input type="text" id="modifier" name="modifier" lay-verify="modifier" value="${user.modifier}" autocomplete="off" placeholder="请输入修改人" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">排序</label>
					<div class="layui-input-block">
						<input type="text" id="reorder" name="reorder" lay-verify="reorder" value="${user.reorder}" autocomplete="off" placeholder="请输入排序" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">备注</label>
					<div class="layui-input-block">
						<input type="text" id="remark" name="remark" lay-verify="remark" value="${user.remark}" autocomplete="off" placeholder="请输入备注" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">出生日期</label>
					<div class="layui-input-block">
						<input type="text" id="userBirth" name="userBirth" lay-verify="userBirth" value="${user.userBirth}" autocomplete="off" placeholder="请输入出生日期" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">身份证号</label>
					<div class="layui-input-block">
						<input type="text" id="cardId" name="cardId" lay-verify="cardId" value="${user.cardId}" autocomplete="off" placeholder="请输入身份证号" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">是否首次申请普通设备</label>
					<div class="layui-input-block">
						<input type="text" id="firstApplyStatus" name="firstApplyStatus" lay-verify="firstApplyStatus" value="${user.firstApplyStatus}" autocomplete="off" placeholder="请输入是否首次申请普通设备" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">剩余在线时间（天）</label>
					<div class="layui-input-block">
						<input type="text" id="leftOnlineTime" name="leftOnlineTime" lay-verify="leftOnlineTime" value="${user.leftOnlineTime}" autocomplete="off" placeholder="请输入剩余在线时间（天）" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">当前红豆币</label>
					<div class="layui-input-block">
						<input type="text" id="rbcAmount" name="rbcAmount" lay-verify="rbcAmount" value="${user.rbcAmount}" autocomplete="off" placeholder="请输入当前红豆币" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">邮箱登录密码</label>
					<div class="layui-input-block">
						<input type="text" id="userEmailPwd" name="userEmailPwd" lay-verify="userEmailPwd" value="${user.userEmailPwd}" autocomplete="off" placeholder="请输入邮箱登录密码" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">学历</label>
					<div class="layui-input-block">
						<input type="text" id="edu" name="edu" lay-verify="edu" value="${user.edu}" autocomplete="off" placeholder="请输入学历" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">职业</label>
					<div class="layui-input-block">
						<input type="text" id="occupation" name="occupation" lay-verify="occupation" value="${user.occupation}" autocomplete="off" placeholder="请输入职业" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">昵称</label>
					<div class="layui-input-block">
						<input type="text" id="nickName" name="nickName" lay-verify="nickName" value="${user.nickName}" autocomplete="off" placeholder="请输入昵称" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">地址</label>
					<div class="layui-input-block">
						<input type="text" id="address" name="address" lay-verify="address" value="${user.address}" autocomplete="off" placeholder="请输入地址" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">QQ</label>
					<div class="layui-input-block">
						<input type="text" id="qq" name="qq" lay-verify="qq" value="${user.qq}" autocomplete="off" placeholder="请输入QQ" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">微信</label>
					<div class="layui-input-block">
						<input type="text" id="wechat" name="wechat" lay-verify="wechat" value="${user.wechat}" autocomplete="off" placeholder="请输入微信" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">手机号码绑定</label>
					<div class="layui-input-block">
						<input type="text" id="mobileBindStatus" name="mobileBindStatus" lay-verify="mobileBindStatus" value="${user.mobileBindStatus}" autocomplete="off" placeholder="请输入手机号码绑定" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">每日登录设备状态</label>
					<div class="layui-input-block">
						<input type="text" id="padLoginDailyStatus" name="padLoginDailyStatus" lay-verify="padLoginDailyStatus" value="${user.padLoginDailyStatus}" autocomplete="off" placeholder="请输入每日登录设备状态" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">是否首次申请vip设备体验</label>
					<div class="layui-input-block">
						<input type="text" id="applyExperStatus" name="applyExperStatus" lay-verify="applyExperStatus" value="${user.applyExperStatus}" autocomplete="off" placeholder="请输入是否首次申请vip设备体验" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">邀请人ID（非邀请码注册为空）</label>
					<div class="layui-input-block">
						<input type="text" id="inviteUserId" name="inviteUserId" lay-verify="inviteUserId" value="${user.inviteUserId}" autocomplete="off" placeholder="请输入邀请人ID（非邀请码注册为空）" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">客户端编号</label>
					<div class="layui-input-block">
						<input type="text" id="userSource" name="userSource" lay-verify="userSource" value="${user.userSource}" autocomplete="off" placeholder="请输入客户端编号" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">是否首次申请体验设备</label>
					<div class="layui-input-block">
						<input type="text" id="firstProbationalStatus" name="firstProbationalStatus" lay-verify="firstProbationalStatus" value="${user.firstProbationalStatus}" autocomplete="off" placeholder="请输入是否首次申请体验设备" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">用户积分</label>
					<div class="layui-input-block">
						<input type="text" id="scoreAmount" name="scoreAmount" lay-verify="scoreAmount" value="${user.scoreAmount}" autocomplete="off" placeholder="请输入用户积分" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">积分等级</label>
					<div class="layui-input-block">
						<input type="text" id="scoreGrade" name="scoreGrade" lay-verify="scoreGrade" value="${user.scoreGrade}" autocomplete="off" placeholder="请输入积分等级" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label"></label>
					<div class="layui-input-block">
						<input type="text" id="mailboxVerificationCode" name="mailboxVerificationCode" lay-verify="mailboxVerificationCode" value="${user.mailboxVerificationCode}" autocomplete="off" placeholder="请输入" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label"></label>
					<div class="layui-input-block">
						<input type="text" id="emailExpireTime" name="emailExpireTime" lay-verify="emailExpireTime" value="${user.emailExpireTime}" autocomplete="off" placeholder="请输入" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label"></label>
					<div class="layui-input-block">
						<input type="text" id="bindPadValidataCode" name="bindPadValidataCode" lay-verify="bindPadValidataCode" value="${user.bindPadValidataCode}" autocomplete="off" placeholder="请输入" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label"></label>
					<div class="layui-input-block">
						<input type="text" id="bindPadExpireTime" name="bindPadExpireTime" lay-verify="bindPadExpireTime" value="${user.bindPadExpireTime}" autocomplete="off" placeholder="请输入" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label"></label>
					<div class="layui-input-block">
						<input type="text" id="version" name="version" lay-verify="version" value="${user.version}" autocomplete="off" placeholder="请输入" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">绑定过的设备数</label>
					<div class="layui-input-block">
						<input type="text" id="boundPadCount" name="boundPadCount" lay-verify="boundPadCount" value="${user.boundPadCount}" autocomplete="off" placeholder="请输入绑定过的设备数" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">客户端类型，android、win、ios</label>
					<div class="layui-input-block">
						<input type="text" id="client" name="client" lay-verify="client" value="${user.client}" autocomplete="off" placeholder="请输入客户端类型，android、win、ios" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label"></label>
					<div class="layui-input-block">
						<input type="text" id="imei" name="imei" lay-verify="imei" value="${user.imei}" autocomplete="off" placeholder="请输入" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">限制使用，1是、0否</label>
					<div class="layui-input-block">
						<input type="text" id="limitUse" name="limitUse" lay-verify="limitUse" value="${user.limitUse}" autocomplete="off" placeholder="请输入限制使用，1是、0否" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">客户端的user_id</label>
					<div class="layui-input-block">
						<input type="text" id="externalUserId" name="externalUserId" lay-verify="externalUserId" value="${user.externalUserId}" autocomplete="off" placeholder="请输入客户端的user_id" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">验证方式 1:现在支付身份验证 0:不验证  空表示未验证</label>
					<div class="layui-input-block">
						<input type="text" id="authType" name="authType" lay-verify="authType" value="${user.authType}" autocomplete="off" placeholder="请输入验证方式 1:现在支付身份验证 0:不验证  空表示未验证" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">用户类型,1代表个人会员。2代表工作室会员</label>
					<div class="layui-input-block">
						<input type="text" id="userClassify" name="userClassify" lay-verify="userClassify" value="${user.userClassify}" autocomplete="off" placeholder="请输入用户类型,1代表个人会员。2代表工作室会员" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">第三方登录唯一标识</label>
					<div class="layui-input-block">
						<input type="text" id="openid" name="openid" lay-verify="openid" value="${user.openid}" autocomplete="off" placeholder="请输入第三方登录唯一标识" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">1:微信,2:qq,3:微博</label>
					<div class="layui-input-block">
						<input type="text" id="openidType" name="openidType" lay-verify="openidType" value="${user.openidType}" autocomplete="off" placeholder="请输入1:微信,2:qq,3:微博" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">邀请类型1：任务邀请，2：活动邀请,3:七夕活动</label>
					<div class="layui-input-block">
						<input type="text" id="inviteType" name="inviteType" lay-verify="inviteType" value="${user.inviteType}" autocomplete="off" placeholder="请输入邀请类型1：任务邀请，2：活动邀请,3:七夕活动" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">微信unionid</label>
					<div class="layui-input-block">
						<input type="text" id="unionid" name="unionid" lay-verify="unionid" value="${user.unionid}" autocomplete="off" placeholder="请输入微信unionid" class="layui-input" >
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<button type="button" class="layui-btn" lay-submit  lay-filter="userSubmit" id="submitBtn">提交</button>
						<button type="reset" class="layui-btn layui-btn-primary">重置</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>

<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script type="text/javascript">
    layui.use(['form', 'layer', 'laydate'], function(){
        var laydate = layui.laydate;
        
		laydate.render({
			elem: '#resetValidataTime'
		});
		laydate.render({
			elem: '#loginTime'
		});
		laydate.render({
			elem: '#userBirth'
		});
		laydate.render({
			elem: '#emailExpireTime'
		});
		laydate.render({
			elem: '#bindPadExpireTime'
		});

        // 校验初始化
        var form = layui.form;
        form.verify({
            
			userIdTmp: function(value, item){
				if(!/^.{0,50}$/.test(value)){
					return '会员ID即登录帐号不能超过50位'
				}
			}
			,userPwd: function(value, item){
				if(!/^.{0,100}$/.test(value)){
					return '登录密码不能超过100位'
				}
			}
			,userName: function(value, item){
				if(!/^.{0,50}$/.test(value)){
					return '会员名称不能超过50位'
				}
			}
			,userImageUrl: function(value, item){
				if(!/^.{0,255}$/.test(value)){
					return '会员头像不能超过255位'
				}
			}
			,userGender: function(value, item){
				if(!/^.{0,8}$/.test(value)){
					return '会员性别 数据字典不能超过8位'
				}
			}
			,userMobilePhone: function(value, item){
				if(!/^.{0,25}$/.test(value)){
					return '会员电话不能超过25位'
				}
			}
			,mobileCarriers: function(value, item){
				if(!/^.{0,8}$/.test(value)){
					return '会员电话所属运营商不能超过8位'
				}
			}
			,userEmail: function(value, item){
				if(!/^.{0,50}$/.test(value)){
					return '会员邮箱不能超过50位'
				}
			}
			,userLevel: function(value, item){
				if(!/^.{0,8}$/.test(value)){
					return '会员等级 数据字典不能超过8位'
				}
			}
			,userStatus: function(value, item){
				if(value > 2147483647){
					return '会员状态必须是2147483647以内的正整数'
				}
			}
			,bindPadMax: function(value, item){
				if(value > 2147483647){
					return '绑定设备最大数必须是2147483647以内的正整数'
				}
			}
			,resetValidataCode: function(value, item){
				if(!/^.{0,200}$/.test(value)){
					return '重置密码验证码不能超过200位'
				}
			}
			,resetValidataTime: function(value, item){
				if(DateTime.TryParse(value)){
					return '重置密码验证码有效期时间格式不正确'
				}
			}
			,registerIp: function(value, item){
				if(!/^.{0,15}$/.test(value)){
					return '注册IP不能超过15位'
				}
			}
			,loginType: function(value, item){
				if(!/^.{0,8}$/.test(value)){
					return '登录方式 网页、客户端（android 、IOS、PC）不能超过8位'
				}
			}
			,loginIp: function(value, item){
				if(!/^.{0,15}$/.test(value)){
					return '登录IP不能超过15位'
				}
			}
			,loginTime: function(value, item){
				if(DateTime.TryParse(value)){
					return '登录时间时间格式不正确'
				}
			}
			,loginCount: function(value, item){
				if(value > 2147483647){
					return '登录次数必须是2147483647以内的正整数'
				}
			}
			,creater: function(value, item){
				if(!/^.{0,50}$/.test(value)){
					return '创建人不能超过50位'
				}
			}
			,modifier: function(value, item){
				if(!/^.{0,50}$/.test(value)){
					return '修改人不能超过50位'
				}
			}
			,reorder: function(value, item){
				if(value > 2147483647){
					return '排序必须是2147483647以内的正整数'
				}
			}
			,remark: function(value, item){
				if(!/^.{0,500}$/.test(value)){
					return '备注不能超过500位'
				}
			}
			,userBirth: function(value, item){
				if(DateTime.TryParse(value)){
					return '出生日期时间格式不正确'
				}
			}
			,cardId: function(value, item){
				if(!/^.{0,32}$/.test(value)){
					return '身份证号不能超过32位'
				}
			}
			,firstApplyStatus: function(value, item){
				if(value > 2147483647){
					return '是否首次申请普通设备必须是2147483647以内的正整数'
				}
			}
			,leftOnlineTime: function(value, item){
				if(value > 2147483647){
					return '剩余在线时间（天）必须是2147483647以内的正整数'
				}
			}
			,rbcAmount: function(value, item){
				if(value > 2147483647){
					return '当前红豆币必须是2147483647以内的正整数'
				}
			}
			,userEmailPwd: function(value, item){
				if(!/^.{0,100}$/.test(value)){
					return '邮箱登录密码不能超过100位'
				}
			}
			,edu: function(value, item){
				if(!/^.{0,50}$/.test(value)){
					return '学历不能超过50位'
				}
			}
			,occupation: function(value, item){
				if(!/^.{0,50}$/.test(value)){
					return '职业不能超过50位'
				}
			}
			,nickName: function(value, item){
				if(!/^.{0,50}$/.test(value)){
					return '昵称不能超过50位'
				}
			}
			,address: function(value, item){
				if(!/^.{0,200}$/.test(value)){
					return '地址不能超过200位'
				}
			}
			,qq: function(value, item){
				if(!/^.{0,50}$/.test(value)){
					return 'QQ不能超过50位'
				}
			}
			,wechat: function(value, item){
				if(!/^.{0,50}$/.test(value)){
					return '微信不能超过50位'
				}
			}
			,mobileBindStatus: function(value, item){
				if(value > 2147483647){
					return '手机号码绑定必须是2147483647以内的正整数'
				}
			}
			,padLoginDailyStatus: function(value, item){
				if(value > 2147483647){
					return '每日登录设备状态必须是2147483647以内的正整数'
				}
			}
			,applyExperStatus: function(value, item){
				if(value > 2147483647){
					return '是否首次申请vip设备体验必须是2147483647以内的正整数'
				}
			}
			,inviteUserId: function(value, item){
				if(value > 2147483647){
					return '邀请人ID（非邀请码注册为空）必须是2147483647以内的正整数'
				}
			}
			,userSource: function(value, item){
				if(!/^.{0,255}$/.test(value)){
					return '客户端编号不能超过255位'
				}
			}
			,firstProbationalStatus: function(value, item){
				if(value > 2147483647){
					return '是否首次申请体验设备必须是2147483647以内的正整数'
				}
			}
			,scoreAmount: function(value, item){
				if(value > 2147483647){
					return '用户积分必须是2147483647以内的正整数'
				}
			}
			,scoreGrade: function(value, item){
				if(value > 2147483647){
					return '积分等级必须是2147483647以内的正整数'
				}
			}
			,mailboxVerificationCode: function(value, item){
				if(!/^.{0,10}$/.test(value)){
					return '不能超过10位'
				}
			}
			,emailExpireTime: function(value, item){
				if(DateTime.TryParse(value)){
					return '时间格式不正确'
				}
			}
			,bindPadValidataCode: function(value, item){
				if(!/^.{0,10}$/.test(value)){
					return '不能超过10位'
				}
			}
			,bindPadExpireTime: function(value, item){
				if(DateTime.TryParse(value)){
					return '时间格式不正确'
				}
			}
			,version: function(value, item){
				if(!/^.{0,20}$/.test(value)){
					return '不能超过20位'
				}
			}
			,boundPadCount: function(value, item){
				if(value > 2147483647){
					return '绑定过的设备数必须是2147483647以内的正整数'
				}
			}
			,client: function(value, item){
				if(!/^.{0,50}$/.test(value)){
					return '客户端类型，android、win、ios不能超过50位'
				}
			}
			,imei: function(value, item){
				if(!/^.{0,255}$/.test(value)){
					return '不能超过255位'
				}
			}
			,limitUse: function(value, item){
				if(!/^.{0,8}$/.test(value)){
					return '限制使用，1是、0否不能超过8位'
				}
			}
			,externalUserId: function(value, item){
				if(value > 2147483647){
					return '客户端的user_id必须是2147483647以内的正整数'
				}
			}
			,authType: function(value, item){
				if(!/^.{0,8}$/.test(value)){
					return '验证方式 1:现在支付身份验证 0:不验证  空表示未验证不能超过8位'
				}
			}
			,userClassify: function(value, item){
				if(!/^.{0,8}$/.test(value)){
					return '用户类型,1代表个人会员。2代表工作室会员不能超过8位'
				}
			}
			,openid: function(value, item){
				if(!/^.{0,100}$/.test(value)){
					return '第三方登录唯一标识不能超过100位'
				}
			}
			,openidType: function(value, item){
				if(!/^.{0,8}$/.test(value)){
					return '1:微信,2:qq,3:微博不能超过8位'
				}
			}
			,inviteType: function(value, item){
				if(!/^.{0,8}$/.test(value)){
					return '邀请类型1：任务邀请，2：活动邀请,3:七夕活动不能超过8位'
				}
			}
			,unionid: function(value, item){
				if(!/^.{0,100}$/.test(value)){
					return '微信unionid不能超过100位'
				}
			}
        });


        form.on('submit(userSubmit)', function(){
            var url = '${ctx}/user/user/';
            if($('#userId').val()){
                url += 'modify';
            }else{
                url += 'add';
			}
            $.post(url, $('form').serialize(), function(result){
                if(result.code == 0){
                    parent.layer.alert('操作成功', {
                        yes: function(index){
                            parent.layer.close(index);
                            closeCurrentTabsPage();
                        }
                    });
                }else{
                    parent.layer.msg(result.msg || '操作失败');
                }
            }, 'json');
            return false;
        });
    });
</script>
</body>
</html>